package com.fanbuchi.fukua.activity;

import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import com.fanbuchi.fukua.R;
import com.fanbuchi.fukua.activity.base.BaseActivity;
import com.fanbuchi.fukua.application.SuperApp;
import com.fanbuchi.fukua.entity.enums.Actions;
import com.fanbuchi.fukua.entity.event.DialogEvent;
import com.fanbuchi.fukua.fragment.LoginFragment;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.FormEncodingBuilder;
import com.squareup.okhttp.Headers;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;

import java.io.IOException;
import java.util.Date;

import de.greenrobot.event.EventBus;

/**
 * Created by rabbit on 2015/6/27.
 */
public class LoginActivity extends BaseActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_started_up);
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.container, new LoginFragment())
                    .commit();
        }

    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_login, menu);
        return true;
    }


    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int id = item.getItemId();
        if (id == R.id.actionReg) {
            startActivity(RegActivity.class);
        }
        return super.onOptionsItemSelected(item);
    }






}
